// app.js
App({
  onLaunch() {
    // 检查登录状态
    const token = wx.getStorageSync('token');
    if (token) {
      this.globalData.isLoggedIn = true;
      this.globalData.userInfo = wx.getStorageSync('userInfo');
    }
  },

  // 引入 towxml 3.0 解析方法
  towxml: require('/towxml/index'),

  globalData: {
    userInfo: null,
    isLoggedIn: false
  }
});
